<?php

namespace App\Remote\AMap;

use Illuminate\Http\Request;
use Symfony\Component\HttpFoundation\Request as RequestAlias;

class AMapRemote extends AMapBaseRemote
{

    public static function district(int $subDistrict = 0, $extensions = "all", $keyWords = "")
    {
        $queryArr = [
            "keywords"    => $keyWords,
            "subdistrict" => $subDistrict,
            "extensions"  => $extensions
        ];
        return self::customRequest(
            "/service/api/restapi?" . http_build_query($queryArr),
            RequestAlias::METHOD_POST,
            [
                "type"    => "config/district",
                "version" => "v3"
            ]
        );
    }

//    public static function getCookie()
//    {
//        return self::customRequest(
//          "https://lbs.amap.com/api/webservice/guide/api/district/?sug_index=1"
//        );
//    }
}
